home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Top 200 Programs
/
Top 200 Programs.iso
/
Bob8
/
THOMPSON
/
LIBERTY
/
PRODUCT
/
LB14W.EXE
/
GETPSTR.BAS
< prev
next >
Wrap
BASIC Source File
|
1997-02-11
|
813b
|
35 lines
'getpstr.bas - Get information using the GetProfileString API call
open "kernel.dll" for dll as #kernel
appName$ = "windows"
keyName$ = "device"
default$ = ""
'add an ASCII zero so that Liberty BASIC will not pass a copy of result$
'into the API call, but a pointer to result$
result$ = "Carl "+chr$(0)
size = 50
calldll #kernel, "GetProfileString",_
appName$ as ptr,_
keyName$ as ptr,_
default$ as ptr,_
result$ as ptr,_
size as short,_
result as short
close #kernel
'display the retrieved information up to but not including the
'terminating ASCII zero
print left$(result$, instr(result$, chr$(0)) - 1)
input r$